#pragma once
#include <game/Config.h>
#include <Config.h>

namespace liba {
namespace lib3d {
namespace hard {
	class Hardware;
	class RenderList;
} // namespace hard
} // namespace lib3d
} // namespace liba


ARELLO_GAME_NAMESPACE_DECL_START

class ScreenBackendSite;

/** Concrete games should define concrete backends for their screens.
*	Screen resource may reference particular backend by name if it was
*	registered within GameScreenBackendFactory.
*/

class ScreenBackend 
{
public:
	ScreenBackend();
	virtual ~ScreenBackend();

	void SetSite(ScreenBackendSite* site);

	virtual void LifeCycle(liba::time_float dt) = 0;
	virtual void render(liba::lib3d::hard::Hardware* hardware, liba::lib3d::hard::RenderList* renderList)
	{
	}
private:
	ScreenBackendSite *site;

protected:
	ScreenBackendSite* GetSite();

	virtual void OnInitialized() = 0;
};

ARELLO_GAME_NAMESPACE_DECL_END